#ifndef _MSG_QUEUE_H
#define _MSG_QUEUE_H

#include "buffer.h"
#include <pthread.h>

struct queue_ ;
typedef struct queue_ Queue_t;

extern Queue_t* newQueue(int threadSafe);
extern void freeQueue(Queue_t *queue);

extern void appendToTail(Queue_t *queue, struct buffer *buff);
extern struct buffer* popFromHead(Queue_t *queue);
extern struct buffer* topOfQueue(Queue_t *queue);
extern int queueSize(Queue_t *queue);

#endif
